package com.dd.mapper;

import com.dd.entity.PurchaseOrderDetails;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dd.entity.PurchaseOrderDetailsProductsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 采购明细表 记录每个采购订单的具体商品信息。 Mapper 接口
 * </p>
 *
 * @author dhd
 * @since 2024-10-21
 */
@Mapper
public interface PurchaseOrderDetailsMapper extends BaseMapper<PurchaseOrderDetails>{

    //添加采购订单
    void insertBatch(List<PurchaseOrderDetails> purchaseOrderDetails);

    List<PurchaseOrderDetailsProductsVO> selectAllByOrderIdAndSupplierId(@Param("orderId") String orderId, @Param("supplierId") Integer supplierId);

    List<PurchaseOrderDetails> selectAllByOrderId(String orderId);

}
